.class public Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;
.super Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaController;
.source "OrmmaUtilityController.java"


# static fields
.field private static final LOG:Lcom/burstly/lib/util/LoggerExt; = null

.field private static final TAG:Ljava/lang/String; = "OrmmaUtilityController"


# instance fields
.field private mAssetController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;

.field private mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

.field private mLocationController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;

.field private mNetworkController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;

.field private mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 44
    invoke-static {}, Lcom/burstly/lib/util/LoggerExt;->getInstance()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    return-void
.end method

.method public constructor <init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;Landroid/content/Context;)V
    .locals 2
    .parameter "adView"
    .parameter "context"

    .prologue
    .line 83
    invoke-direct {p0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaController;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;Landroid/content/Context;)V

    .line 84
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;

    invoke-direct {v0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;Landroid/content/Context;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mAssetController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;

    .line 85
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    invoke-direct {v0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;Landroid/content/Context;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    .line 86
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;

    invoke-direct {v0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;Landroid/content/Context;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mLocationController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;

    .line 87
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;

    invoke-direct {v0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;Landroid/content/Context;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mNetworkController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;

    .line 88
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    invoke-direct {v0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;Landroid/content/Context;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    .line 89
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mAssetController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;

    const-string v1, "ORMMAAssetsControllerBridge"

    invoke-virtual {p1, v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->addJavascriptInterface(Ljava/lang/Object;Ljava/lang/String;)V

    .line 90
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    const-string v1, "ORMMADisplayControllerBridge"

    invoke-virtual {p1, v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->addJavascriptInterface(Ljava/lang/Object;Ljava/lang/String;)V

    .line 91
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mLocationController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;

    const-string v1, "ORMMALocationControllerBridge"

    invoke-virtual {p1, v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->addJavascriptInterface(Ljava/lang/Object;Ljava/lang/String;)V

    .line 92
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mNetworkController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;

    const-string v1, "ORMMANetworkControllerBridge"

    invoke-virtual {p1, v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->addJavascriptInterface(Ljava/lang/Object;Ljava/lang/String;)V

    .line 93
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    const-string v1, "ORMMASensorControllerBridge"

    invoke-virtual {p1, v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->addJavascriptInterface(Ljava/lang/Object;Ljava/lang/String;)V

    .line 94
    return-void
.end method

.method static synthetic access$000(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"
    .parameter "x2"
    .parameter "x3"
    .parameter "x4"

    .prologue
    .line 39
    invoke-direct {p0, p1, p2, p3, p4}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->addCalendarEvent(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method private addCalendarEvent(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 14
    .parameter "callendarId"
    .parameter "date"
    .parameter "title"
    .parameter "body"

    .prologue
    .line 286
    iget-object v11, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mContext:Landroid/content/Context;

    invoke-virtual {v11}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    .line 287
    .local v1, cr:Landroid/content/ContentResolver;
    invoke-static/range {p2 .. p2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v5

    .line 288
    .local v5, dtStart:J
    const-wide/32 v11, 0x36ee80

    add-long v3, v5, v11

    .line 289
    .local v3, dtEnd:J
    new-instance v2, Landroid/content/ContentValues;

    invoke-direct {v2}, Landroid/content/ContentValues;-><init>()V

    .line 290
    .local v2, cv:Landroid/content/ContentValues;
    const-string v11, "calendar_id"

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v12

    invoke-virtual {v2, v11, v12}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 291
    const-string v11, "title"

    move-object/from16 v0, p3

    invoke-virtual {v2, v11, v0}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 292
    const-string v11, "description"

    move-object/from16 v0, p4

    invoke-virtual {v2, v11, v0}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 293
    const-string v11, "dtstart"

    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v12

    invoke-virtual {v2, v11, v12}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    .line 294
    const-string v11, "hasAlarm"

    const/4 v12, 0x1

    invoke-static {v12}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v12

    invoke-virtual {v2, v11, v12}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 295
    const-string v11, "dtend"

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v12

    invoke-virtual {v2, v11, v12}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    .line 297
    sget v11, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v12, 0x8

    if-ne v11, v12, :cond_1

    .line 298
    const-string v11, "content://com.android.calendar/events"

    invoke-static {v11}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v11

    invoke-virtual {v1, v11, v2}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    move-result-object v9

    .line 302
    .local v9, newEvent:Landroid/net/Uri;
    :goto_0
    if-eqz v9, :cond_0

    .line 303
    invoke-virtual {v9}, Landroid/net/Uri;->getLastPathSegment()Ljava/lang/String;

    move-result-object v11

    invoke-static {v11}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v7

    .line 304
    .local v7, id:J
    new-instance v10, Landroid/content/ContentValues;

    invoke-direct {v10}, Landroid/content/ContentValues;-><init>()V

    .line 305
    .local v10, values:Landroid/content/ContentValues;
    const-string v11, "event_id"

    invoke-static {v7, v8}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v12

    invoke-virtual {v10, v11, v12}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    .line 306
    const-string v11, "method"

    const/4 v12, 0x1

    invoke-static {v12}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v12

    invoke-virtual {v10, v11, v12}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 307
    const-string v11, "minutes"

    const/16 v12, 0xf

    invoke-static {v12}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v12

    invoke-virtual {v10, v11, v12}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 308
    sget v11, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v12, 0x8

    if-ne v11, v12, :cond_2

    .line 309
    const-string v11, "content://com.android.calendar/reminders"

    invoke-static {v11}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v11

    invoke-virtual {v1, v11, v10}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    .line 314
    .end local v7           #id:J
    .end local v10           #values:Landroid/content/ContentValues;
    :cond_0
    :goto_1
    iget-object v11, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mContext:Landroid/content/Context;

    const-string v12, "Event added to calendar"

    const/4 v13, 0x0

    invoke-static {v11, v12, v13}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v11

    invoke-virtual {v11}, Landroid/widget/Toast;->show()V

    .line 315
    return-void

    .line 300
    .end local v9           #newEvent:Landroid/net/Uri;
    :cond_1
    const-string v11, "content://calendar/events"

    invoke-static {v11}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v11

    invoke-virtual {v1, v11, v2}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    move-result-object v9

    .restart local v9       #newEvent:Landroid/net/Uri;
    goto :goto_0

    .line 311
    .restart local v7       #id:J
    .restart local v10       #values:Landroid/content/ContentValues;
    :cond_2
    const-string v11, "content://calendar/reminders"

    invoke-static {v11}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v11

    invoke-virtual {v1, v11, v10}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    goto :goto_1
.end method

.method private createTelUrl(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter "number"

    .prologue
    .line 190
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 191
    const/4 v1, 0x0

    .line 195
    :goto_0
    return-object v1

    .line 193
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "tel:"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 194
    .local v0, buf:Ljava/lang/StringBuilder;
    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 195
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method private getSupports()Ljava/lang/String;
    .locals 6

    .prologue
    .line 118
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "supports: [ \'level-1\', \'screen\', \'orientation\', \'network\']"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 141
    .local v0, supports:Ljava/lang/StringBuilder;
    sget-object v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v2, "OrmmaUtilityController"

    const-string v3, "getSupports: {0}"

    const/4 v4, 0x1

    new-array v4, v4, [Ljava/lang/Object;

    const/4 v5, 0x0

    aput-object v0, v4, v5

    invoke-virtual {v1, v2, v3, v4}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 142
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method


# virtual methods
.method public activate(Ljava/lang/String;)V
    .locals 5
    .parameter "event"

    .prologue
    .line 358
    sget-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v1, "OrmmaUtilityController"

    const-string v2, "activate: {0}"

    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    aput-object p1, v3, v4

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 359
    const-string v0, "networkChange"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 360
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mNetworkController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;->startNetworkListener()V

    .line 373
    :cond_0
    :goto_0
    return-void

    .line 361
    :cond_1
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mLocationController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;->allowLocationServices()Z

    move-result v0

    if-eqz v0, :cond_2

    const-string v0, "locationChange"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 363
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mLocationController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;->startLocationListener()V

    goto :goto_0

    .line 364
    :cond_2
    const-string v0, "shake"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    .line 365
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;->startShakeListener()V

    goto :goto_0

    .line 366
    :cond_3
    const-string v0, "tiltChange"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_4

    .line 367
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;->startTiltListener()V

    goto :goto_0

    .line 368
    :cond_4
    const-string v0, "headingChange"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_5

    .line 369
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;->startHeadingListener()V

    goto :goto_0

    .line 370
    :cond_5
    const-string v0, "orientationChange"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 371
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;->startConfigurationListener()V

    goto :goto_0
.end method

.method public createEvent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 20
    .parameter "date"
    .parameter "title"
    .parameter "body"
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    .prologue
    .line 225
    sget-object v5, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v8, "OrmmaUtilityController"

    const-string v10, "createEvent: date: {0} title: {1} body: {2}"

    const/4 v11, 0x3

    new-array v11, v11, [Ljava/lang/Object;

    const/4 v12, 0x0

    aput-object p1, v11, v12

    const/4 v12, 0x1

    aput-object p2, v11, v12

    const/4 v12, 0x2

    aput-object p3, v11, v12

    invoke-virtual {v5, v8, v10, v11}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 226
    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v4

    .line 228
    .local v4, cr:Landroid/content/ContentResolver;
    const/4 v5, 0x3

    new-array v6, v5, [Ljava/lang/String;

    const/4 v5, 0x0

    const-string v8, "_id"

    aput-object v8, v6, v5

    const/4 v5, 0x1

    const-string v8, "displayName"

    aput-object v8, v6, v5

    const/4 v5, 0x2

    const-string v8, "_sync_account"

    aput-object v8, v6, v5

    .line 231
    .local v6, cols:[Ljava/lang/String;
    sget v5, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v8, 0x8

    if-ne v5, v8, :cond_2

    .line 232
    const-string v5, "content://com.android.calendar/calendars"

    invoke-static {v5}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v5

    const/4 v7, 0x0

    const/4 v8, 0x0

    const/4 v9, 0x0

    invoke-virtual/range {v4 .. v9}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v17

    .line 236
    .local v17, cursor:Landroid/database/Cursor;
    :goto_0
    if-eqz v17, :cond_0

    invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v5

    if-nez v5, :cond_3

    .line 238
    :cond_0
    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mContext:Landroid/content/Context;

    const-string v8, "No calendar account found"

    const/4 v10, 0x1

    invoke-static {v5, v8, v10}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v5

    invoke-virtual {v5}, Landroid/widget/Toast;->show()V

    .line 239
    if-eqz v17, :cond_1

    .line 240
    invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->close()V

    .line 275
    :cond_1
    :goto_1
    return-void

    .line 234
    .end local v17           #cursor:Landroid/database/Cursor;
    :cond_2
    const-string v5, "content://calendar/calendars"

    invoke-static {v5}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v5

    const/4 v7, 0x0

    const/4 v8, 0x0

    const/4 v9, 0x0

    invoke-virtual/range {v4 .. v9}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v17

    .restart local v17       #cursor:Landroid/database/Cursor;
    goto :goto_0

    .line 244
    :cond_3
    invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->getCount()I

    move-result v5

    const/4 v8, 0x1

    if-ne v5, v8, :cond_4

    .line 245
    const/4 v5, 0x0

    move-object/from16 v0, v17

    invoke-interface {v0, v5}, Landroid/database/Cursor;->getInt(I)I

    move-result v5

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    move-object/from16 v2, p2

    move-object/from16 v3, p3

    invoke-direct {v0, v5, v1, v2, v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->addCalendarEvent(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 274
    :goto_2
    invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->close()V

    goto :goto_1

    .line 247
    :cond_4
    new-instance v9, Ljava/util/ArrayList;

    invoke-direct {v9}, Ljava/util/ArrayList;-><init>()V

    .line 248
    .local v9, entries:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;>;"
    const/16 v19, 0x0

    .local v19, i:I
    :goto_3
    invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->getCount()I

    move-result v5

    move/from16 v0, v19

    if-ge v0, v5, :cond_5

    .line 249
    new-instance v18, Ljava/util/HashMap;

    invoke-direct/range {v18 .. v18}, Ljava/util/HashMap;-><init>()V

    .line 250
    .local v18, entry:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v5, "ID"

    const/4 v8, 0x0

    move-object/from16 v0, v17

    invoke-interface {v0, v8}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v8

    move-object/from16 v0, v18

    invoke-interface {v0, v5, v8}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 251
    const-string v5, "NAME"

    const/4 v8, 0x1

    move-object/from16 v0, v17

    invoke-interface {v0, v8}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v8

    move-object/from16 v0, v18

    invoke-interface {v0, v5, v8}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 252
    const-string v5, "EMAILID"

    const/4 v8, 0x2

    move-object/from16 v0, v17

    invoke-interface {v0, v8}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v8

    move-object/from16 v0, v18

    invoke-interface {v0, v5, v8}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 253
    move-object/from16 v0, v18

    invoke-interface {v9, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 254
    invoke-interface/range {v17 .. v17}, Landroid/database/Cursor;->moveToNext()Z

    .line 248
    add-int/lit8 v19, v19, 0x1

    goto :goto_3

    .line 256
    .end local v18           #entry:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    :cond_5
    new-instance v16, Landroid/app/AlertDialog$Builder;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mContext:Landroid/content/Context;

    move-object/from16 v0, v16

    invoke-direct {v0, v5}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 257
    .local v16, builder:Landroid/app/AlertDialog$Builder;
    const-string v5, "Choose Calendar to save event to"

    move-object/from16 v0, v16

    invoke-virtual {v0, v5}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 258
    new-instance v7, Landroid/widget/SimpleAdapter;

    move-object/from16 v0, p0

    iget-object v8, v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mContext:Landroid/content/Context;

    const v10, 0x109000d

    const/4 v5, 0x2

    new-array v11, v5, [Ljava/lang/String;

    const/4 v5, 0x0

    const-string v12, "NAME"

    aput-object v12, v11, v5

    const/4 v5, 0x1

    const-string v12, "EMAILID"

    aput-object v12, v11, v5

    const/4 v5, 0x2

    new-array v12, v5, [I

    fill-array-data v12, :array_0

    invoke-direct/range {v7 .. v12}, Landroid/widget/SimpleAdapter;-><init>(Landroid/content/Context;Ljava/util/List;I[Ljava/lang/String;[I)V

    .line 264
    .local v7, adapter:Landroid/widget/ListAdapter;
    const/4 v5, -0x1

    new-instance v10, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController$1;

    move-object/from16 v11, p0

    move-object v12, v9

    move-object/from16 v13, p1

    move-object/from16 v14, p2

    move-object/from16 v15, p3

    invoke-direct/range {v10 .. v15}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController$1;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    move-object/from16 v0, v16

    invoke-virtual {v0, v7, v5, v10}, Landroid/app/AlertDialog$Builder;->setSingleChoiceItems(Landroid/widget/ListAdapter;ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 272
    invoke-virtual/range {v16 .. v16}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v5

    invoke-virtual {v5}, Landroid/app/AlertDialog;->show()V

    goto/16 :goto_2

    .line 258
    :array_0
    .array-data 0x4
        0x14t 0x0t 0x2t 0x1t
        0x15t 0x0t 0x2t 0x1t
    .end array-data
.end method

.method public deactivate(Ljava/lang/String;)V
    .locals 5
    .parameter "event"

    .prologue
    .line 381
    sget-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v1, "OrmmaUtilityController"

    const-string v2, "deactivate: {0}"

    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    aput-object p1, v3, v4

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 382
    const-string v0, "networkChange"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 383
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mNetworkController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;->stopNetworkListener()V

    .line 395
    :cond_0
    :goto_0
    return-void

    .line 384
    :cond_1
    const-string v0, "locationChange"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 385
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mLocationController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;->stopAllListeners()V

    goto :goto_0

    .line 386
    :cond_2
    const-string v0, "shake"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    .line 387
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;->stopShakeListener()V

    goto :goto_0

    .line 388
    :cond_3
    const-string v0, "tiltChange"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_4

    .line 389
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;->stopTiltListener()V

    goto :goto_0

    .line 390
    :cond_4
    const-string v0, "headingChange"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_5

    .line 391
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;->stopHeadingListener()V

    goto :goto_0

    .line 392
    :cond_5
    const-string v0, "orientationChange"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 393
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;->stopConfigurationListener()V

    goto :goto_0
.end method

.method public deleteOldAds()V
    .locals 1
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    .prologue
    .line 402
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mAssetController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;->deleteOldAds()V

    .line 403
    return-void
.end method

.method public init(F)V
    .locals 6
    .parameter "density"

    .prologue
    .line 102
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "window.ormmaview.fireChangeEvent({ state: \'default\', network: \'"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mNetworkController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;->getNetwork()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\',"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " size: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;->getSize()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ","

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " maxSize: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;->getMaxSize()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ","

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " screenSize: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;->getScreenSize()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ","

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " defaultPosition: { x:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mOrmmaView:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->getLeft()I

    move-result v2

    int-to-float v2, v2

    div-float/2addr v2, p1

    float-to-int v2, v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ", y: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mOrmmaView:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->getTop()I

    move-result v2

    int-to-float v2, v2

    div-float/2addr v2, p1

    float-to-int v2, v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ", width: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mOrmmaView:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->getWidth()I

    move-result v2

    int-to-float v2, v2

    div-float/2addr v2, p1

    float-to-int v2, v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ", height: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mOrmmaView:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->getHeight()I

    move-result v2

    int-to-float v2, v2

    div-float/2addr v2, p1

    float-to-int v2, v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " }, orientation:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;->getOrientation()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ","

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->getSupports()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ", placementType:\'"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mOrmmaView:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->getPlacementType()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\', viewable: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;->isViewable()Z

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "});"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 110
    .local v0, injection:Ljava/lang/String;
    sget-object v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v2, "OrmmaUtilityController"

    const-string v3, "init: injection: {0}"

    const/4 v4, 0x1

    new-array v4, v4, [Ljava/lang/Object;

    const/4 v5, 0x0

    aput-object v0, v4, v5

    invoke-virtual {v1, v2, v3, v4}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 111
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mOrmmaView:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    invoke-virtual {v1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->injectJavaScript(Ljava/lang/String;)V

    .line 112
    return-void
.end method

.method public makeCall(Ljava/lang/String;)V
    .locals 7
    .parameter "number"
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    .prologue
    .line 205
    sget-object v2, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v3, "OrmmaUtilityController"

    const-string v4, "makeCall: number: {0}"

    const/4 v5, 0x1

    new-array v5, v5, [Ljava/lang/Object;

    const/4 v6, 0x0

    aput-object p1, v5, v6

    invoke-virtual {v2, v3, v4, v5}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 206
    invoke-direct {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->createTelUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 207
    .local v1, url:Ljava/lang/String;
    if-nez v1, :cond_0

    .line 208
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mOrmmaView:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;

    const-string v3, "Bad Phone Number"

    const-string v4, "makeCall"

    invoke-virtual {v2, v3, v4}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;->raiseError(Ljava/lang/String;Ljava/lang/String;)V

    .line 214
    :goto_0
    return-void

    .line 210
    :cond_0
    new-instance v0, Landroid/content/Intent;

    const-string v2, "android.intent.action.CALL"

    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    invoke-direct {v0, v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 211
    .local v0, i:Landroid/content/Intent;
    const/high16 v2, 0x1000

    invoke-virtual {v0, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 212
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mContext:Landroid/content/Context;

    invoke-virtual {v2, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto :goto_0
.end method

.method public prepareWrappedContentString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter "content"
    .parameter "injection"

    .prologue
    .line 349
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mAssetController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;

    invoke-virtual {v0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;->prepareWrappedContentString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public readStreamAndPrepareWrappedContentString(Ljava/io/InputStream;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter "is"
    .parameter "injection"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 338
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mAssetController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;

    invoke-virtual {v0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;->readStreamAndPrepareWrappedContentString(Ljava/io/InputStream;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public sendMail(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 8
    .parameter "recipient"
    .parameter "subject"
    .parameter "body"
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    .prologue
    const/4 v7, 0x1

    const/4 v6, 0x0

    .line 171
    sget-object v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v2, "OrmmaUtilityController"

    const-string v3, "sendMail: recipient: {0} subject: {1} body: {2}"

    const/4 v4, 0x3

    new-array v4, v4, [Ljava/lang/Object;

    aput-object p1, v4, v6

    aput-object p2, v4, v7

    const/4 v5, 0x2

    aput-object p3, v4, v5

    invoke-virtual {v1, v2, v3, v4}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 172
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.SEND"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 173
    .local v0, i:Landroid/content/Intent;
    const-string v1, "plain/text"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    .line 174
    const-string v1, "android.intent.extra.EMAIL"

    new-array v2, v7, [Ljava/lang/String;

    aput-object p1, v2, v6

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;[Ljava/lang/String;)Landroid/content/Intent;

    .line 177
    const-string v1, "android.intent.extra.SUBJECT"

    invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 178
    const-string v1, "android.intent.extra.TEXT"

    invoke-virtual {v0, v1, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 179
    const/high16 v1, 0x1000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 180
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mContext:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 181
    return-void
.end method

.method public sendSMS(Ljava/lang/String;Ljava/lang/String;)V
    .locals 6
    .parameter "recipient"
    .parameter "body"
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    .prologue
    .line 153
    sget-object v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v2, "OrmmaUtilityController"

    const-string v3, "sendSMS: recipient: {0} body: {1}"

    const/4 v4, 0x2

    new-array v4, v4, [Ljava/lang/Object;

    const/4 v5, 0x0

    aput-object p1, v4, v5

    const/4 v5, 0x1

    aput-object p2, v4, v5

    invoke-virtual {v1, v2, v3, v4}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 154
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.VIEW"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 155
    .local v0, sendIntent:Landroid/content/Intent;
    const-string v1, "address"

    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 156
    const-string v1, "sms_body"

    invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 157
    const-string v1, "vnd.android-dir/mms-sms"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    .line 158
    const/high16 v1, 0x1000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 159
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mContext:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 160
    return-void
.end method

.method public setMaxSize(II)V
    .locals 1
    .parameter "w"
    .parameter "h"
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    .prologue
    .line 325
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    invoke-virtual {v0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;->setMaxSize(II)V

    .line 326
    return-void
.end method

.method public showAlert(Ljava/lang/String;)V
    .locals 3
    .parameter "message"
    .annotation runtime Landroid/webkit/JavascriptInterface;
    .end annotation

    .prologue
    .line 426
    sget-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v1, "OrmmaUtilityController"

    const/4 v2, 0x0

    new-array v2, v2, [Ljava/lang/Object;

    invoke-virtual {v0, v1, p1, v2}, Lcom/burstly/lib/util/LoggerExt;->logError(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 427
    return-void
.end method

.method public stopAllListeners()V
    .locals 3

    .prologue
    .line 408
    :try_start_0
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mAssetController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaAssetController;->stopAllListeners()V

    .line 409
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mDisplayController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaDisplayController;->stopAllListeners()V

    .line 410
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mLocationController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaLocationController;->stopAllListeners()V

    .line 411
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mNetworkController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaNetworkController;->stopAllListeners()V

    .line 412
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->mSensorController:Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaSensorController;->stopAllListeners()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 417
    :goto_0
    return-void

    .line 414
    :catch_0
    move-exception v0

    .line 415
    .local v0, e:Ljava/lang/Exception;
    sget-object v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaUtilityController;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v2, "OrmmaUtilityController"

    invoke-virtual {v1, v2, v0}, Lcom/burstly/lib/util/LoggerExt;->logThrowable(Ljava/lang/String;Ljava/lang/Throwable;)V

    goto :goto_0
.end method
